Package-level declarations

Types

Link copied to clipboard
data class CustomDpEntry(val uiModeType: UiModeType? = null, val dpQualifierEntry: DpQualifierEntry? = null, val orientation: Orientation? = Orientation.DEFAULT, val customValue: Float, val finalQualifierResolver: DpQualifier? = null, val priority: Int, val inverter: Inverter? = Inverter.DEFAULT)

EN Represents a custom dimension entry with qualifiers and priority. Used by the DimenPerimeter class to define specific values for screen conditions.

Link copied to clipboard
data class CustomSpEntry(val uiModeType: UiModeType? = null, val dpQualifierEntry: DpQualifierEntry? = null, val orientation: Orientation = Orientation.DEFAULT, val customValue: Number, val finalQualifierResolver: DpQualifier? = null, val priority: Int, val inverter: Inverter = Inverter.DEFAULT, val fontScale: Boolean = true)

EN Represents a custom Sp entry with qualifiers and priority, for the non-Compose Sp builder.

Link copied to clipboard
class DimenPerimeter(val initialBaseDp: Float, val sortedCustomEntries: List<CustomDpEntry> = emptyList(), val ignoreMultiWindows: Boolean = false, val applyAspectRatio: Boolean = false, val customSensitivityK: Float? = null)

EN A class that allows defining custom dimensions based on screen qualifiers (UiModeType, Width, Height, Smallest Width).

Link copied to clipboard

EN Utility object for handling SDP (Scalable Dp) dimensions from Java.

Link copied to clipboard

EN Utility object for handling SSP (Scalable Sp) dimensions from Java.

Link copied to clipboard
class PerimeterSp(val initialBaseValue: Number, val defaultFontScale: Boolean = true, val sortedCustomEntries: List<CustomSpEntry> = emptyList(), val ignoreMultiWindows: Boolean = false, val applyAspectRatio: Boolean = false, val customSensitivityK: Float? = null)

EN A class that allows defining custom Sp text dimensions based on screen qualifiers (UiModeType, Width, Height, Smallest Width).

Properties

Link copied to clipboard
private const val BASE_RATIO_STEP: Float = 300.0f
private const val BASE_RATIO_STEP: Float = 300.0f

Functions

Link copied to clipboard
internal fun calculatePerimeterDp(baseValue: Float, configuration: Configuration, qualifier: DpQualifier, inverter: Inverter, ignoreMultiWindows: Boolean, applyAspectRatio: Boolean, customSensitivityK: Float?, context: Context? = null): Float

EN Shared pure-math scaling kernel used by toDynamicPerimeterPx and toDynamicPerimeterDp.

Link copied to clipboard
private fun calculatePerimeterSp(baseValue: Float, configuration: Configuration, qualifier: DpQualifier, inverter: Inverter, ignoreMultiWindows: Boolean, applyAspectRatio: Boolean, customSensitivityK: Float?): Float

EN Internal logic to calculate the scaled SP value (similar to DP calculation but conceptually for text).

Link copied to clipboard
internal fun getQualifierValue(qualifier: DpQualifier, configuration: Configuration): Float

EN Gets the actual value from the Configuration for the given DpQualifier.

Link copied to clipboard
fun Number.hei(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Height (hDP) (WITHOUT FONT SCALE). Usage example: 32.hei(context).

Link copied to clipboard
fun Number.heia(context: Context): Float
Link copied to clipboard
fun Number.heii(context: Context): Float
Link copied to clipboard
fun Number.heiia(context: Context): Float
Link copied to clipboard
fun Number.hemLw(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Height (hDP) (WITHOUT FONT SCALE), but in landscape orientation it acts as Screen Width (wDP). Usage example: 32.hemLw(context).

Link copied to clipboard
fun Number.hemLwa(context: Context): Float
Link copied to clipboard
fun Number.hemLwi(context: Context): Float
Link copied to clipboard
fun Number.hemLwia(context: Context): Float
Link copied to clipboard
fun Number.hemPw(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Height (hDP) (WITHOUT FONT SCALE), but in portrait orientation it acts as Screen Width (wDP). Usage example: 32.hemPw(context).

Link copied to clipboard
fun Number.hemPwa(context: Context): Float
Link copied to clipboard
fun Number.hemPwi(context: Context): Float
Link copied to clipboard
fun Number.hemPwia(context: Context): Float
Link copied to clipboard
fun Number.hspa(context: Context): Float
Link copied to clipboard
fun Number.hspi(context: Context): Float
Link copied to clipboard
fun Number.hspia(context: Context): Float
Link copied to clipboard
fun Number.hspLw(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Height (hDP), but in landscape orientation it acts as Screen Width (wDP). Usage example: 32.hspLw(context).

Link copied to clipboard
fun Number.hspLwa(context: Context): Float
Link copied to clipboard
fun Number.hspLwi(context: Context): Float
Link copied to clipboard
fun Number.hspLwia(context: Context): Float
Link copied to clipboard
fun Number.hspMode(context: Context, modeValue: Number, uiModeType: UiModeType, finalQualifierResolver: DpQualifier? = null, fontScale: Boolean = true, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Height (hDP).

Link copied to clipboard
fun Number.hspPw(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Height (hDP), but in portrait orientation it acts as Screen Width (wDP). Usage example: 32.hspPw(context).

Link copied to clipboard
fun Number.hspPwa(context: Context): Float
Link copied to clipboard
fun Number.hspPwi(context: Context): Float
Link copied to clipboard
fun Number.hspPwia(context: Context): Float
Link copied to clipboard
fun Number.hspQualifier(context: Context, qualifiedValue: Number, qualifierType: DpQualifier, qualifierValue: Number, finalQualifierResolver: DpQualifier? = null, fontScale: Boolean = true, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Height (hSP). Uses the base value by default, but when the screen metric for qualifierType is >= qualifierValue, it uses qualifiedValue instead.

Link copied to clipboard
fun Number.hspRotate(context: Context, rotationValue: Number, finalQualifierResolver: DpQualifier = DpQualifier.HEIGHT, orientation: Orientation = Orientation.LANDSCAPE, fontScale: Boolean = true, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Height (hDP).

Link copied to clipboard
fun Number.hspScreen(context: Context, screenValue: Number, uiModeType: UiModeType, qualifierType: DpQualifier, qualifierValue: Number, finalQualifierResolver: DpQualifier? = null, fontScale: Boolean = true, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Height (hSP). Uses the base value by default, but when the device matches uiModeType AND the screen metric for qualifierType is >= qualifierValue, it uses screenValue instead.

Link copied to clipboard

EN Starts the build chain for the custom dimension DimenPerimeter from a base Float (Dp). PT Inicia a cadeia de construção para a dimensão customizada DimenPerimeter a partir de um Float (Dp) base.

EN Starts the build chain for the custom dimension DimenPerimeter from a base Int (Dp). PT Inicia a cadeia de construção para a dimensão customizada DimenPerimeter a partir de um Int (Dp) base.

Link copied to clipboard

EN Starts the build chain for PerimeterSp from a base Float (treated as sp). PT Inicia a cadeia de construção para PerimeterSp a partir de um Float base (tratado como sp).

EN Starts the build chain for PerimeterSp from a base Int (treated as sp). PT Inicia a cadeia de construção para PerimeterSp a partir de um Int base (tratado como sp).

Link copied to clipboard
fun Number.prhdp(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Height (hDP). Usage example: 32.hdp(context).

Link copied to clipboard
fun Number.prhdpa(context: Context): Float
Link copied to clipboard
fun Number.prhdpi(context: Context): Float
Link copied to clipboard
fun Number.prhdpia(context: Context): Float
Link copied to clipboard
fun Number.prhdpLw(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Height (hDP), but in landscape orientation it acts as Screen Width (wDP). Usage example: 32.hdpLw(context).

Link copied to clipboard
fun Number.prhdpLwa(context: Context): Float
Link copied to clipboard
fun Number.prhdpLwi(context: Context): Float
Link copied to clipboard
fun Number.prhdpLwia(context: Context): Float
Link copied to clipboard
fun Number.prhdpMode(context: Context, modeValue: Number, uiModeType: UiModeType, finalQualifierResolver: DpQualifier? = null, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Height (hDP).

Link copied to clipboard
fun Number.prhdpPw(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Height (hDP), but in portrait orientation it acts as Screen Width (wDP). Usage example: 32.hdpPw(context).

Link copied to clipboard
fun Number.prhdpPwa(context: Context): Float
Link copied to clipboard
fun Number.prhdpPwi(context: Context): Float
Link copied to clipboard
fun Number.prhdpPwia(context: Context): Float
Link copied to clipboard
fun Number.prhdpQualifier(context: Context, qualifiedValue: Number, qualifierType: DpQualifier, qualifierValue: Number, finalQualifierResolver: DpQualifier? = null, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Height (hDP). Uses the base value by default, but when the screen metric for qualifierType is >= qualifierValue, it uses qualifiedValue instead.

Link copied to clipboard
fun Number.prhdpRotate(context: Context, rotationValue: Number, finalQualifierResolver: DpQualifier = DpQualifier.HEIGHT, orientation: Orientation = Orientation.LANDSCAPE, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Height (hDP).

Link copied to clipboard
fun Number.prhdpScreen(context: Context, screenValue: Number, uiModeType: UiModeType, qualifierType: DpQualifier, qualifierValue: Number, finalQualifierResolver: DpQualifier? = null, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Height (hDP). Uses the base value by default, but when the device matches uiModeType AND the screen metric for qualifierType is >= qualifierValue, it uses screenValue instead.

Link copied to clipboard
fun Number.prhsp(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Height (hDP). Usage example: 32.prhsp(context).

Link copied to clipboard
fun Number.prsdp(context: Context): Float

EN Extension for Int with dynamic scaling based on the Smallest Width (swDP). Usage example: 16.sdp(context).

Link copied to clipboard
fun Number.prsdpa(context: Context): Float
Link copied to clipboard
fun Number.prsdpi(context: Context): Float
Link copied to clipboard
fun Number.prsdpia(context: Context): Float
Link copied to clipboard
fun Number.prsdpLh(context: Context): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP), but in landscape orientation it acts as Screen Height (hDP). Usage example: 32.sdpLh(context).

Link copied to clipboard
fun Number.prsdpLha(context: Context): Float
Link copied to clipboard
fun Number.prsdpLhi(context: Context): Float
Link copied to clipboard
fun Number.prsdpLhia(context: Context): Float
Link copied to clipboard
fun Number.prsdpLw(context: Context): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP), but in landscape orientation it acts as Screen Width (wDP). Usage example: 32.sdpLw(context).

Link copied to clipboard
fun Number.prsdpLwa(context: Context): Float
Link copied to clipboard
fun Number.prsdpLwi(context: Context): Float
Link copied to clipboard
fun Number.prsdpLwia(context: Context): Float
Link copied to clipboard
fun Number.prsdpMode(context: Context, modeValue: Number, uiModeType: UiModeType, finalQualifierResolver: DpQualifier? = null, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP). Uses the base value by default, but when the device matches the specified uiModeType, it uses modeValue instead.

Link copied to clipboard
fun Number.prsdpPh(context: Context): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP), but in portrait orientation it acts as Screen Height (hDP). Usage example: 32.sdpPh(context).

Link copied to clipboard
fun Number.prsdpPha(context: Context): Float
Link copied to clipboard
fun Number.prsdpPhi(context: Context): Float
Link copied to clipboard
fun Number.prsdpPhia(context: Context): Float
Link copied to clipboard
fun Number.prsdpPw(context: Context): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP), but in portrait orientation it acts as Screen Width (wDP). Usage example: 32.sdpPw(context).

Link copied to clipboard
fun Number.prsdpPwa(context: Context): Float
Link copied to clipboard
fun Number.prsdpPwi(context: Context): Float
Link copied to clipboard
fun Number.prsdpPwia(context: Context): Float
Link copied to clipboard
fun Number.prsdpQualifier(context: Context, qualifiedValue: Number, qualifierType: DpQualifier, qualifierValue: Number, finalQualifierResolver: DpQualifier? = null, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP). Uses the base value by default, but when the screen metric for qualifierType is >= qualifierValue, it uses qualifiedValue instead.

Link copied to clipboard
fun Number.prsdpRotate(context: Context, rotationValue: Number, finalQualifierResolver: DpQualifier = DpQualifier.SMALL_WIDTH, orientation: Orientation = Orientation.LANDSCAPE, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP). Uses the base value by default, but when the device is in the specified orientation, it uses rotationValue scaled with the given finalQualifierResolver.

Link copied to clipboard
fun Number.prsdpScreen(context: Context, screenValue: Number, uiModeType: UiModeType, qualifierType: DpQualifier, qualifierValue: Number, finalQualifierResolver: DpQualifier? = null, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP). Uses the base value by default, but when the device matches uiModeType AND the screen metric for qualifierType is >= qualifierValue, it uses screenValue instead.

Link copied to clipboard
fun Number.prssp(context: Context): Float

EN Extension for Int with dynamic scaling based on the Smallest Width (swDP). Usage example: 16.prssp(context).

Link copied to clipboard
fun Number.prwdp(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Width (wDP). Usage example: 100.wdp(context).

Link copied to clipboard
fun Number.prwdpa(context: Context): Float
Link copied to clipboard
fun Number.prwdpi(context: Context): Float
Link copied to clipboard
fun Number.prwdpia(context: Context): Float
Link copied to clipboard
fun Number.prwdpLh(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Width (wDP), but in landscape orientation it acts as Screen Height (hDP). Usage example: 100.wdpLh(context).

Link copied to clipboard
fun Number.prwdpLha(context: Context): Float
Link copied to clipboard
fun Number.prwdpLhi(context: Context): Float
Link copied to clipboard
fun Number.prwdpLhia(context: Context): Float
Link copied to clipboard
fun Number.prwdpMode(context: Context, modeValue: Number, uiModeType: UiModeType, finalQualifierResolver: DpQualifier? = null, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Width (wDP).

Link copied to clipboard
fun Number.prwdpPh(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Width (wDP), but in portrait orientation it acts as Screen Height (hDP). Usage example: 100.wdpPh(context).

Link copied to clipboard
fun Number.prwdpPha(context: Context): Float
Link copied to clipboard
fun Number.prwdpPhi(context: Context): Float
Link copied to clipboard
fun Number.prwdpPhia(context: Context): Float
Link copied to clipboard
fun Number.prwdpQualifier(context: Context, qualifiedValue: Number, qualifierType: DpQualifier, qualifierValue: Number, finalQualifierResolver: DpQualifier? = null, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Width (wDP). Uses the base value by default, but when the screen metric for qualifierType is >= qualifierValue, it uses qualifiedValue instead.

Link copied to clipboard
fun Number.prwdpRotate(context: Context, rotationValue: Number, finalQualifierResolver: DpQualifier = DpQualifier.WIDTH, orientation: Orientation = Orientation.LANDSCAPE, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Width (wDP).

Link copied to clipboard
fun Number.prwdpScreen(context: Context, screenValue: Number, uiModeType: UiModeType, qualifierType: DpQualifier, qualifierValue: Number, finalQualifierResolver: DpQualifier? = null, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Width (wDP). Uses the base value by default, but when the device matches uiModeType AND the screen metric for qualifierType is >= qualifierValue, it uses screenValue instead.

Link copied to clipboard
fun Number.prwsp(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Width (wDP). Usage example: 100.prwsp(context).

Link copied to clipboard
fun Number.sei(context: Context): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP) (WITHOUT FONT SCALE). Usage example: 16.sei(context).

Link copied to clipboard
fun Number.seia(context: Context): Float
Link copied to clipboard
fun Number.seii(context: Context): Float
Link copied to clipboard
fun Number.seiia(context: Context): Float
Link copied to clipboard
fun Number.semLh(context: Context): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP) (WITHOUT FONT SCALE), but in landscape orientation it acts as Screen Height (hDP). Usage example: 32.semLh(context).

Link copied to clipboard
fun Number.semLha(context: Context): Float
Link copied to clipboard
fun Number.semLhi(context: Context): Float
Link copied to clipboard
fun Number.semLhia(context: Context): Float
Link copied to clipboard
fun Number.semLw(context: Context): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP) (WITHOUT FONT SCALE), but in landscape orientation it acts as Screen Width (wDP). Usage example: 32.semLw(context).

Link copied to clipboard
fun Number.semLwa(context: Context): Float
Link copied to clipboard
fun Number.semLwi(context: Context): Float
Link copied to clipboard
fun Number.semLwia(context: Context): Float
Link copied to clipboard
fun Number.semPh(context: Context): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP) (WITHOUT FONT SCALE), but in portrait orientation it acts as Screen Height (hDP). Usage example: 32.semPh(context).

Link copied to clipboard
fun Number.semPha(context: Context): Float
Link copied to clipboard
fun Number.semPhi(context: Context): Float
Link copied to clipboard
fun Number.semPhia(context: Context): Float
Link copied to clipboard
fun Number.semPw(context: Context): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP) (WITHOUT FONT SCALE), but in portrait orientation it acts as Screen Width (wDP). Usage example: 32.semPw(context).

Link copied to clipboard
fun Number.semPwa(context: Context): Float
Link copied to clipboard
fun Number.semPwi(context: Context): Float
Link copied to clipboard
fun Number.semPwia(context: Context): Float
Link copied to clipboard
fun Number.sspa(context: Context): Float
Link copied to clipboard
fun Number.sspi(context: Context): Float
Link copied to clipboard
fun Number.sspia(context: Context): Float
Link copied to clipboard
fun Number.sspLh(context: Context): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP), but in landscape orientation it acts as Screen Height (hDP). Usage example: 32.sspLh(context).

Link copied to clipboard
fun Number.sspLha(context: Context): Float
Link copied to clipboard
fun Number.sspLhi(context: Context): Float
Link copied to clipboard
fun Number.sspLhia(context: Context): Float
Link copied to clipboard
fun Number.sspLw(context: Context): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP), but in landscape orientation it acts as Screen Width (wDP). Usage example: 32.sspLw(context).

Link copied to clipboard
fun Number.sspLwa(context: Context): Float
Link copied to clipboard
fun Number.sspLwi(context: Context): Float
Link copied to clipboard
fun Number.sspLwia(context: Context): Float
Link copied to clipboard
fun Number.sspMode(context: Context, modeValue: Number, uiModeType: UiModeType, finalQualifierResolver: DpQualifier? = null, fontScale: Boolean = true, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP).

Link copied to clipboard
fun Number.sspPh(context: Context): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP), but in portrait orientation it acts as Screen Height (hDP). Usage example: 32.sspPh(context).

Link copied to clipboard
fun Number.sspPha(context: Context): Float
Link copied to clipboard
fun Number.sspPhi(context: Context): Float
Link copied to clipboard
fun Number.sspPhia(context: Context): Float
Link copied to clipboard
fun Number.sspPw(context: Context): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP), but in portrait orientation it acts as Screen Width (wDP). Usage example: 32.sspPw(context).

Link copied to clipboard
fun Number.sspPwa(context: Context): Float
Link copied to clipboard
fun Number.sspPwi(context: Context): Float
Link copied to clipboard
fun Number.sspPwia(context: Context): Float
Link copied to clipboard
fun Number.sspQualifier(context: Context, qualifiedValue: Number, qualifierType: DpQualifier, qualifierValue: Number, finalQualifierResolver: DpQualifier? = null, fontScale: Boolean = true, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swSP). Uses the base value by default, but when the screen metric for qualifierType is >= qualifierValue, it uses qualifiedValue instead.

Link copied to clipboard
fun Number.sspRotate(context: Context, rotationValue: Number, finalQualifierResolver: DpQualifier = DpQualifier.SMALL_WIDTH, orientation: Orientation = Orientation.LANDSCAPE, fontScale: Boolean = true, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swDP). Uses the base value by default, but when the device is in the specified orientation, it uses rotationValue scaled with the given finalQualifierResolver.

Link copied to clipboard
fun Number.sspScreen(context: Context, screenValue: Number, uiModeType: UiModeType, qualifierType: DpQualifier, qualifierValue: Number, finalQualifierResolver: DpQualifier? = null, fontScale: Boolean = true, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Smallest Width (swSP). Uses the base value by default, but when the device matches uiModeType AND the screen metric for qualifierType is >= qualifierValue, it uses screenValue instead.

Link copied to clipboard
fun Number.toDynamicPerimeterDp(context: Context, qualifier: DpQualifier, inverter: Inverter = Inverter.DEFAULT, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Converts a Number (base Dp value) into a dynamically scaled Dp Float for View-based (non-Compose) code.

Link copied to clipboard
fun Number.toDynamicPerimeterPx(context: Context, qualifier: DpQualifier, inverter: Inverter = Inverter.DEFAULT, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Converts a Number (base Dp value) into a dynamically scaled pixel Float for View-based (non-Compose) code.

Link copied to clipboard
fun Number.toDynamicPerimeterSp(context: Context, qualifier: DpQualifier, fontScale: Boolean = true, inverter: Inverter = Inverter.DEFAULT, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Converts an Int (base Sp) to a dynamically scaled Sp value (as Float).

Link copied to clipboard
fun Number.toDynamicPerimeterSpPx(context: Context, qualifier: DpQualifier, fontScale: Boolean = true, inverter: Inverter = Inverter.DEFAULT, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Converts an Int (the base Sp value) into a dynamically scaled pixel value (Float).

Link copied to clipboard
fun Number.wei(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Width (wDP) (WITHOUT FONT SCALE). Usage example: 100.wei(context).

Link copied to clipboard
fun Number.weia(context: Context): Float
Link copied to clipboard
fun Number.weii(context: Context): Float
Link copied to clipboard
fun Number.weiia(context: Context): Float
Link copied to clipboard
fun Number.wemLh(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Width (wDP) (WITHOUT FONT SCALE), but in landscape orientation it acts as Screen Height (hDP). Usage example: 100.wemLh(context).

Link copied to clipboard
fun Number.wemLha(context: Context): Float
Link copied to clipboard
fun Number.wemLhi(context: Context): Float
Link copied to clipboard
fun Number.wemLhia(context: Context): Float
Link copied to clipboard
fun Number.wemPh(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Width (wDP) (WITHOUT FONT SCALE), but in portrait orientation it acts as Screen Height (hDP). Usage example: 100.wemPh(context).

Link copied to clipboard
fun Number.wemPha(context: Context): Float
Link copied to clipboard
fun Number.wemPhi(context: Context): Float
Link copied to clipboard
fun Number.wemPhia(context: Context): Float
Link copied to clipboard
fun Number.wspa(context: Context): Float
Link copied to clipboard
fun Number.wspi(context: Context): Float
Link copied to clipboard
fun Number.wspia(context: Context): Float
Link copied to clipboard
fun Number.wspLh(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Width (wDP), but in landscape orientation it acts as Screen Height (hDP). Usage example: 100.wspLh(context).

Link copied to clipboard
fun Number.wspLha(context: Context): Float
Link copied to clipboard
fun Number.wspLhi(context: Context): Float
Link copied to clipboard
fun Number.wspLhia(context: Context): Float
Link copied to clipboard
fun Number.wspMode(context: Context, modeValue: Number, uiModeType: UiModeType, finalQualifierResolver: DpQualifier? = null, fontScale: Boolean = true, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Width (wDP).

Link copied to clipboard
fun Number.wspPh(context: Context): Float

EN Extension for Int with dynamic scaling based on the Screen Width (wDP), but in portrait orientation it acts as Screen Height (hDP). Usage example: 100.wspPh(context).

Link copied to clipboard
fun Number.wspPha(context: Context): Float
Link copied to clipboard
fun Number.wspPhi(context: Context): Float
Link copied to clipboard
fun Number.wspPhia(context: Context): Float
Link copied to clipboard
fun Number.wspQualifier(context: Context, qualifiedValue: Number, qualifierType: DpQualifier, qualifierValue: Number, finalQualifierResolver: DpQualifier? = null, fontScale: Boolean = true, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Width (wSP). Uses the base value by default, but when the screen metric for qualifierType is >= qualifierValue, it uses qualifiedValue instead.

Link copied to clipboard
fun Number.wspRotate(context: Context, rotationValue: Number, finalQualifierResolver: DpQualifier = DpQualifier.WIDTH, orientation: Orientation = Orientation.LANDSCAPE, fontScale: Boolean = true, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Width (wDP).

Link copied to clipboard
fun Number.wspScreen(context: Context, screenValue: Number, uiModeType: UiModeType, qualifierType: DpQualifier, qualifierValue: Number, finalQualifierResolver: DpQualifier? = null, fontScale: Boolean = true, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Extension for Int with dynamic scaling based on Screen Width (wSP). Uses the base value by default, but when the device matches uiModeType AND the screen metric for qualifierType is >= qualifierValue, it uses screenValue instead.